<script setup lang="ts">
import { ref, onMounted } from "vue";
import { getAllSuggestions } from "@/apis";

const tableData = ref<any[]>([]);

onMounted(async () => {
  const response = await getAllSuggestions();
  tableData.value = response.data.data;
});
</script>

<template>
  <div>
    <h1>用户评论</h1>
    <div>
      <el-table :data="tableData" style="width: 100%" stripe>
        <el-table-column prop="name" label="用户名"></el-table-column>
        <el-table-column prop="message" label="用户评论"></el-table-column>
      </el-table>
    </div>
  </div>
</template>

<style scoped></style>
